package top.continew.ai.util.parse;

/**
 * ParseFactory:
 *
 * @Author： Lonni
 * @Date： 2025/8/21  15:54
 */
public class ParseFactory {

    public static ParseFactory me=new ParseFactory();

    public  BaseParse getParse(String fileName) {
        if (fileName.endsWith(".pdf")) {
            return new PagePdfParse();
        } else if (fileName.endsWith(".md")) {
            return new TextParse();
        } else if (fileName.endsWith(".json")) {
            return new JsonParse();
        } else if (fileName.endsWith(".txt")) {
            return new TextParse();
        } else if (fileName.endsWith(".docx")||fileName.endsWith(".doc")) {
            return new ApachTikaParse();
        } else {
            return new TextParse();
        }

    }




}
